home *** CD-ROM | disk | FTP | other *** search
- on mouseDown
- global oPuppeteer, oStoryteller, gScanFinish, gCPU
- set pkScanIcon to 41
- set pkBarIcon to 42
- set pkAmberIcon to 43
- set camSprite to 44
- set peekText to 40
- set peekVideo to getProp(the lsForegroundData of oPuppeteer, #PkVideoNormal)
- resetPeeKdisplay()
- set currentStatus to getState(oStoryteller, #PKscanStatus)
- if (currentStatus = #ReadyForPlayback) and (getState(oStoryteller, #scanUnitIsActive) = 0) then
- set currentStatus to #Online
- setProp(the lsStateData of oStoryteller, #PKscanStatus, [#Online])
- end if
- if getPos([#Wait1min, #Wait2min, #Wait3min, #Wait4min, #Wait5min], currentStatus) then
- if not gScanFinish then
- put ">•> There is no set 'gScanFinish' time.. this can only lead to trouble..."
- exit
- else
- set minutesRemaining to ((gScanFinish - the ticks) / 3600) + 1
- if minutesRemaining > 0 then
- set currentStatus to getAt([#Wait1min, #Wait2min, #Wait3min, #Wait4min, #Wait5min], minutesRemaining)
- else
- set currentStatus to #ReadyForPlayback
- end if
- end if
- end if
- if (currentStatus <> #Offline) and (currentStatus <> #CantAttach) then
- set the castNum of sprite pkScanIcon to getAt(getProp(the lsMultiFrames of oPuppeteer, #scanIcon), 4)
- setState(oStoryteller, #PKscanStatus, currentStatus)
- end if
- set textList to getProp(the lsMultiFrames of oPuppeteer, #peekText)
- set stateMsg to value("#scan" & currentStatus)
- set the castNum of sprite 40 to getProp(textList, stateMsg)
- soundEffect(#peekButton)
- if gCPU = #PC then
- suspendSounds()
- end if
- updateStage()
- set whichKnob to getState(oStoryteller, #DoorWithScanUnit)
- if whichKnob = #kitchenInside then
- set PKscan to #none
- end if
- if whichKnob = #kitchenOutside then
- set PKscan to getProp(peekVideo, #PkPatioScan)
- end if
- if whichKnob = #bathroomInside then
- set PKscan to getProp(peekVideo, #PkBathroomScan)
- end if
- if whichKnob = #bathroomOutside then
- set PKscan to #none
- end if
- if whichKnob = #margaretRmInside then
- set PKscan to #none
- end if
- if whichKnob = #margaretRmOutside then
- set PKscan to getProp(peekVideo, #Pk40sScan)
- end if
- if whichKnob = #garageInside then
- set PKscan to #none
- end if
- if whichKnob = #garageOutside then
- set PKscan to #none
- end if
- if whichKnob = #boathouseInside then
- set PKscan to #none
- end if
- if whichKnob = #boatHouseOutside then
- set PKscan to getProp(peekVideo, #PkBoathouseScan)
- end if
- if whichKnob = #none then
- set PKscan to #none
- end if
- set minutesRemaining to ((gScanFinish - the ticks) / 3600) + 1
- cursorOn()
- repeat while the mouseDown
- nothing()
- end repeat
- set bailOut to 0
- repeat while getPos([#Wait1min, #Wait2min, #Wait3min, #Wait4min, #Wait5min], currentStatus)
- if the mouseDown then
- set bailOut to 1
- set textList to getProp(the lsMultiFrames of oPuppeteer, #peekText)
- set the castNum of sprite peekText to getProp(textList, #none)
- resetPeeKdisplay()
- exit repeat
- end if
- if the ticks > (gScanFinish - (minutesRemaining * 3600) + 3600) then
- set minutesRemaining to minutesRemaining - 1
- if minutesRemaining > 0 then
- setState(oStoryteller, #PKscanStatus, getAt([#Wait1min, #Wait2min, #Wait3min, #Wait4min, #Wait5min], minutesRemaining))
- updateStage()
- next repeat
- end if
- setState(oStoryteller, #PKscanStatus, #ReadyForPlayback)
- updateStage()
- set gScanFinish to 0
- exit repeat
- end if
- end repeat
- if getState(oStoryteller, #PKscanStatus) = #ReadyForPlayback then
- if PKscan = #none then
- exit
- end if
- if voidp(PKscan) then
- exit
- end if
- set the castNum of sprite camSprite to PKscan
- set the movieTime of sprite camSprite to 0
- set the movieRate of sprite camSprite to 0
- end if
- if bailOut then
- idle()
- pass()
- end if
- end
-